<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="net.skyedu.dao.*,net.skyedu.bean.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	pageContext.setAttribute("path", path);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>班级学生信息</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	
	<link rel="stylesheet" type="text/css" href="${path }/attend/myattend/css/reset.css">
	<link rel="stylesheet" type="text/css" href="${path }/attend/myattend/css/main.css"/>
	<script type="text/javascript" src="${path }/attend/js/lhgdialog/jquery-1.7.2.min.js"></script>
	
  </head>
  
<body>
<%
	String attId = request.getParameter("attId");
	AjaxDao ad = new AjaxDao();
	List<Detail> list = ad.getClockIn(Integer.parseInt(attId));
	pageContext.setAttribute("today", ad.getDate(Integer.parseInt(attId)));
	pageContext.setAttribute("list", list);
	pageContext.setAttribute("len", list.size());
%>
<br/>
    <div>
      <table class="result">
        <tr>
          <th colspan="2">${today }&nbsp;&nbsp;打卡记录</th>
        </tr>
        <tr>
          <th>打卡时间</th>
          <th>打卡校区</th>
        </tr>
	      <c:choose>
		      <c:when test="${len != 0}">
			      <c:forEach items="${list}" var="list">
		          <tr>
			          <td>${list.datetime }</td>
			          <td>${list.schName }</td>
		          </tr>
				  </c:forEach>
			  </c:when>
			  <c:otherwise>
			  	<td colspan="2"><font color="red">无记录！</font></td>
			  </c:otherwise>
		  </c:choose>
      </table>
    </div>
</body>
</html>
